/*
 * Corey Birdsall, Gabriel Noblesmith
 * ECE400
 * Oct. 5th, 2011
 * This will blink an LED on the ATMEGA1284p
 */

#define F_CPU 1000000
#include <avr/io.h>
//#include <avr/iom1284p.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdio.h>

void init(void);

int main(void) {
	init();			// Initialize them ports


	PORTD = 0xFF;	// Set PORTD high

	while(1) {
		PORTD = ~PORTD;	// Turn LED on or off
		_delay_ms(1000);
	}
   
	return 0;
}
 
void init(void)
{
	DDRD=0xFF;  // PORTD all outputs
}	

